<!-- <!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <table border="1" cellpadding="20" width="800" rules="all">
        <tr>
            <th id="area">银行卡余额</th>
            <th id="water">水费</th>
            <th id="electricity">电费</th>
            <th id="net">网费</th>
            <th id="area">银行卡余额</th>
        </tr>
        <tr>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
        </tr>
    </table>
    
    <script>
        const table = document.querySelector("table");
        let remain = document.getElementById("area");
        let water = document.getElementById("water");
        let electricity = document.getElementById("electricity");
        let net = document.getElementById("net");
        let surplus = document.getElementById("surplus");
        document.write(`
        <tr>
            <th id="area">银行卡余额</th>
            <th id="water">水费</th>
            <th id="electricity">电费</th>
            <th id="net">网费</th>
            <th id="surplus">银行卡余额</th>
        </tr>
        <tr>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
        </tr>
    </table>
        `)
    </script>
</body>
</html> -->






<!-- <!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <title>房贷计算器</title>
    <style>
      /* 样式表 */
      body {
        font-family: Arial, Helvetica, sans-serif;
        margin: 0;
        padding: 0;
      }

      .container {
        max-width: 600px;
        margin: 0 auto;
        padding: 20px;
        background-color: #f5f5f5;
        border-radius: 10px;
      }

      h1 {
        text-align: center;
        margin-top: 0;
      }

      label {
        display: block;
        margin-bottom: 10px;
      }

      input[type='number'] {
        width: 100%;
        padding: 10px;
        border: none;
        border-radius: 5px;
        margin-bottom: 20px;
        box-sizing: border-box;
        font-size: 16px;
      }

      input[type='submit'] {
        background-color: #4caf50;
        color: #fff;
        border: none;
        padding: 10px 20px;
        border-radius: 5px;
        cursor: pointer;
        font-size: 16px;
      }

      input[type='submit']:hover {
        background-color: #3e8e41;
      }

      #result {
        margin-top: 20px;
        font-size: 24px;
        text-align: center;
      }
    </style>
  </head>
  <body>
    <div class="container">
      <h1>房贷计算器</h1>
      <form>
        <label>银行卡余额</label>
        <input type="number" id="area" />

        <label>水费</label>
        <input type="number" id="price" />

        <label>电费</label>
        <input type="number" id="ratio" />

        <label>网费</label>
        <input type="number" id="years" />

        <label>银行卡余额</label>
        <input type="number" id="surplus" />

        <input type="submit" value="计算" />
      </form>

      <div id="result">
        <p>银行卡余额</p>
        <p>水费</p>
        <p>电费</p>
        <p>网费</p>
        <p>银行卡余额</p>
      </div>
    </div>

    <script src="script.js"></script>
  </body>
</html> -->
